======================================= VARIATION ======================================= To print this document, open it in Windows Write, or another word processing application, select the entire document and format the text in 10 point Courier before printing. To get an understanding of the principles of S.P.C. and how to apply them, I recommend "Understanding Statistical Process Control" by Donald J. Wheeler and David S. Chambers . ISBN 0- 945320-13-2, published by SPC Press Inc., 5908 Toole Drive, Suite C, Knoxville, Tennessee 37919, Tel:(615) 584-5005 Fax:(615) 588-9440. Available in the U.K. from the British Deming Association, The Old George Brewery, Rollestone Street, Salisbury, SP1 1DX. Tel: 01722 412138 Fax: 01722 414428. To understand the importance of reducing variation in processes, and the other parts of Dr Deming's teachings on "management for quality", I recommend "The Deming Dimension" by Dr Henry R. Neave ISBN 0-945320-08-6, also available from the British Deming Association. ======================================= INSTRUCTIONS FOR USE ======================================= Variation is a "Windows" programme written in Visual Basic 3.0. It started life simply as a fun way to generate random numbers while the author was reading about Statistical Process Control. It has developed into something which should be useful to anyone who is studying that subject. A ball is fired from a launcher, bounces once, then lands on a target. A small amount of random variation is built in to the launch velocity and the bounciness of each ball. This is done using Visual Basic's random number generator transformed by the Polar Marsaglia method to produce a normal (bell-shaped) distribution of results. There are three modes of operation, (to change mode select NEW from the FILE menu). 1. Normal or "File" mode. ------------------------- In this mode the parameters which control the random variation of the velocity of balls and the way they bounce on the floor are controlled by a programme which can be kept on file. Normally these programmes would be prepared in advance by a teacher, and some examples are provided (the VPROGx.VAR files). The purpose of this mode is to show students how different types of variation look when displayed on control charts. The student can try to keep the balls landing as close as possible to the target value of 500 by moving the launcher, he or she will then see the effects of these changes on the chart. 2. Funnel Experiment Simulation. -------------------------------- This is a simulation of Dr W. Edwards Deming's funnel experiment which demonstrates some basic points about the nature of variation. 3. Game Mode. ------------- The game should give the user some experience in trying to identify special causes of variation using a control chart. It should also let the user see the effects of changing the centring of a process and give some sense of when to recalculate control limits. Instructions for the game are available from the menu bar when in game mode. The Windows Environment ======================================= Using "Variation" should be fairly intuitive to anyone who is familiar with the Windows environment. If you use Windows programmes regularly, go on to the next section. For those who are new to Windows, here are a few general points. COMMAND BUTTONS To invoke the action of a command button on the screen such as the "Start" button on the Main Window, click on it with the mouse. (move the screen pointer to the button then press the left hand mouse button once). If you do not have a mouse, hold down ALT while typing the small underlined letter on the button's caption. (from now on this will be called ALT + letter). If the button has a dark line around it, the button can be clicked by pressing the ENTER key on the keyboard. In many windows or dialogue boxes, it is possible to exit or close down the window or dialogue box be pressing the ESC button on the keyboard. MENUS To use the menus at the top of the main screen (e.g. File, Calculate, Control etc.) open the menu by clicking the menu heading with the mouse or press ALT + letter. Then "mouse click" on the command you want, or press the underlined letter, or use the up and down arrow keys until the command is highlighted then press ENTER. SCROLL BARS Scroll bars are mainly used to bring different results into view. If the small scroll box is at the top or left hand end of the scroll bar, the first result will be displayed, if the scroll box is at the bottom or right hand end, then the last result will be displayed. To move a scroll box with a mouse proceed as follows: Drag it with the mouse (i.e. move the pointer to the box then press and hold down the left mouse button. Move the mouse and release the button at the point you want the scroll box to stop). You can also click on the small arrows at the ends of the scroll bars to make a small change or click on bar itself to make a larger change. To move a scroll box without a mouse: Keep pressing TAB until the Scroll Box flashes (you have to look closely). Use the up or down arrow keys, or the Page Up or Page Down keys. TEXT BOXES Text boxes are usually used to enter a number such as the Launcher Position in the Main Window or to enter text such as a File Name in the Open or Save As dialogue box. To change what is in Text Box, first make the text box active by: a) clicking on it with the mouse, or b) press ALT + the underlined letter of the nearest caption, or c) keep pressing TAB until the flashing cursor is seen in the box. once the box is active, use the backspace or delete keys to remove the old text or number, then type in the new number. You can also drag the mouse across the old text or number to highlight it, then enter the new value. CHECK BOXES A check box is a small rectangular box with a caption beside it. If the box has a cross in it this means that the box has been selected and the action indicated by the caption will be carried out. To change the condition a check box, click on it with the mouse or press ALT + letter. OPTION BUTTONS Option buttons are small circular buttons set in groups of two or more. Only one button of the group can be selected at a time. To change which one out of the group of buttons is selected, click on the new selection with the mouse, or keep pressing TAB until a small box is seen round one of the captions then press the left or right arrow keys. WINDOW POSITION The screen position of windows and dialogue boxes can be changed. Use the mouse to drag the title bar at the top of the window. It is often useful to move the windows so that a part of each window is visible on the screen. This allows rapid switching between the windows by clicking with the mouse on any part of the window. WINDOW SIZE The size of some windows can be changed. Use the mouse to drag one of the borders or one of the corners of the window. To make the window fill the screen, click on the small box at the top right hand corner of the window. Clicking the same box will return the window to the previous size. ======================================= The Main Window ======================================= Note: The Main window can be changed in size or maximised. Balls are fired from a "Launcher" - the balls bounce once on the baseline and their final landing position is recorded. If you are trying to keep the process "centred", the idea is to get as many balls as possible to land as close as possible to the "500" mark. There is random variation built in to the actual launch velocity and the amount of "bounce" of the ball. The final landing position is influenced by the random variation factors, and the launcher position. To move the launcher, simply drag it to the left or right with the mouse (put the mouse pointer over the launcher, press the left mouse button and hold it down, move the launcher to the new position then release the button). Clicking on the '5' or '1' buttons in the Launcher Position frame moves the launcher by 5 or 1 units. To move the launcher to an exact position: 1) Use the mouse to click on the white box inside the Launcher Position frame, or keep pressing TAB until the flashing cursor is seen in the box. 2) Use the Delete or Backspace key to edit the number to the new value, or delete the old value and type + or - then a relative value (i.e. to change from 1000 to 800 you can either type in 800 or -200) 3) Click on the Move button or press ALT+m. You can press ENTER on the keyboard instead if the button has a dark line around it. The Launch Position uses the same units as the Landing Position. i.e. an increase of 100 units of the Launch Position will increase the average Landing Position by 100 units (if all other factors remain unchanged). You can fire balls singly or in batches. The batch size is determined by the option buttons in the "Shots" frame. To change the batch size, click on one of the small circles with the mouse, or press TAB repeatedly until a small box is seen around one of the option numbers, then press the left or right arrow keys. (You can change the number of shots allocated to the buttons by double clicking in the "Shots" frame). To actually fire the balls click on the "Start" button , or press ALT+s on the keyboard briefly, or, if the button has a dark line round it, press ENTER. The Main window includes a Menu system to make use of the other features of "Variation". THE FILE MENU IN THE MAIN WINDOW CONTAINS: ------------------------------------------ NEW This selection allows you to select one of the three modes, restarting from shot no 1. If you select "File" mode with settings retained, this keeps the existing Variation and Shot Set-up values and the Variation Programme. OPEN Opens a previously saved variation file. Everything is returned to the condition it was in when the file was saved. SAVE Saves all results, the variation and shot settings and the variation programme. If you want to save just the settings and variation programme with no results, create a New File with settings retained , then save the file before firing any shots. Note that you cannot Save in Game, or Funnel Experiment modes. SAVE AS Same as Save above except the user is prompted for a name for the file. EXIT "Variation" is closed down. THE CALCULATE MENU IN THE MAIN WINDOW CONTAINS: ----------------------------------------------- MEAN The "Calculate Mean" dialogue box is opened. This allows calculation of the mean (average) and standard deviation of all, or just some, of the individual shots. Enter the shots you want to include in the calculations into the text boxes. The latest shot is shown underneath the "To" text box. To enter this number in the box, just click on the number with the mouse. If you press the CALCULATE button, the mean or average, and the standard deviation will be shown in the dialogue box. The standard deviation is calculated using the "unbiased" or "n-1" method. The CLOSE button returns you to the Main Window. To display a Mean line on the Minichart (the running record at the right of the Main Window) click the "Show Mean" check box before you click the CLOSE button. On the minichart, shot numbers and results which were included in the calculations are shown in white. Lines at 3 times the standard deviation can also be superimposed on the minichart. These are calculated from the INDIVIDUAL results so this is the incorrect way to compute control lines. This feature is useful for demonstrating the superiority of the X-bar & Range system when the data used to calculate the lines contains special cause variation. LOSS This window is based on Dr Genichi Taguchi's theory that the overall cost of losses due to poor quality is a quadratic function which increases as the square of the distance from the ideal or target value (in this case the target is 500). Individual results are used for the calculations, and then averages are displayed. THE CONTROL MENU IN THE MAIN WINDOW CONTAINS: --------------------------------------------- VARIATION Selecting "Variation" brings up the Variation Dialogue Box: The way that the random number generator affects the centring and dispersion of velocity and bounce factors is changed using this dialogue box. The text boxes under "Manual Variation Changes" show the current settings. To make a change, change a number in a box, then click the O.K. button. Values between 0 and 99 will be accepted. The Cancel button allows an opportunity to return the boxes to the current values before the O.K. button is clicked. Alternatively, a variation programme can be set up which will cause changes to happen at pre-set shots. To enter a programmed change, use the "Programmed Variation Changes" section of the dialogue box as follows: If there is only one empty row on the table, click the "Edit Item" button. If all the rows already contain values, click the "Add Item" button. The "Edit Variation Programme Entry" dialogue box then appears. Enter the shot number at which you want the change to take place, then enter the new factors for bounce or velocity (0 to 99) in the "Change To" section . It is not necessary to put an entry in every box in this section, boxes which are left blank will make no change to the relevant factor. The Clear Entry button will clear all the text boxes. To get the cursor into a text box either a) click on the box with the mouse, or b) press ALT + letter on the keyboard, or c) press TAB to move to the next box. Click the O.K. button to add the entry to the variation programme. Instead of adding a new programmed change, an existing change can be edited as follows: 1) Highlight a cell in the row in the Programmed Changes Table by clicking on it with the mouse. 2) Click the Edit Item button. A programme entry can be deleted completely as follows: 1) Highlight a cell in the row in the Programmed Changes Table by clicking on it with the mouse. 2) Click the Delete Item button. If a programmed variation change is set for the next shot and a manual change is entered, the programmed change will be the one which takes effect. Note: If you want a very large number of changes which are regular in nature, it might be quicker to write the variation programme using a spreadsheet. Read the file TECHINCL.TXT. SHOTS This brings up the Shots Set-up dialogue box. The "Options For Number of Shots" text boxes affect the Shots Options in the main window. For example, if you want to be able to fire a batch of 200 shots with one button click, change one of the boxes to 200. The "Display Speed for Single Shots" scroll bar will change the speed that a single shot moves across the screen. Multiple shots always go as fast as the computer will allow. NOTE: There is a shortcut method to bring up the Shots Set-up dialogue box, double click inside the "Shots" frame in the main window. GAME When you are in the Game mode, you can select the Game Control dialogue box with this menu option. THE CHARTS MENU IN THE MAIN WINDOW CONTAINS: -------------------------------------------- MINICHART The minichart is the running record shown on the right hand side of the main window. The minichart is toggled on and off by selecting this menu item. If there are more shots than can be shown in the chart, a scroll bar at the right hand side of the window becomes visible. This allows scrolling to see the landing position of any of the shots. CONTROL CHARTS This opens a dialogue box which allows you to choose the type of chart to be displayed. You can select between a Moving Range chart and Xbar and Range charts with various subgroup sizes. For more details of the control charts, see below. HISTOGRAM This opens the Histogram window. For more details see below. TABLE This shows the Results Table for Individual Shots. The user can write notes alongside the results, however, the Launch Position is automatically recorded every time it is changed. The user can also manually enter results, this allows all the features of "Variation" to be used on data generated elsewhere. To write or edit a note or change or enter a landing position, proceed as follows: 1) Highlight the shot number by clicking with the mouse in any cell in the appropriate row in the table, then click on "Edit Entry", or Click on "New Entry". This produces a new entry after the present last shot. This can be used for manual entry of data. 2) Enter or edit the result or note in the text box. Integers between -10000 and +10000 can be entered for results. Press TAB to move from the Result box to the Note box. 3) Click the "O.K." button in the Edit Note dialogue box. All or part of the Results Table can be placed on the Windows clipboard. This allows the results to be "pasted" into a Word Processor or Spreadsheet for further calculations or printout. To copy all or a part of the table on to the clipboard proceed as follows: 1) Highlight the section you want to copy by dragging the mouse pointer from one corner of the section to the opposite corner. If you want the whole table to be copied, make sure that only ONE cell is highlighted. 2) Click the "Copy" button or press ALT + o on the keyboard. ======================================= Control Charts ======================================= This window is for showing Shewhart control charts for the landing position of the ball. If there are more results than can be shown in the chart at one time, the scroll bar at the bottom of the window becomes active. This allows scrolling to see any of the results. Note: The Control Chart window can be changed in size or maximised. Control lines can be added to the charts. Proceed as follows: 1) Click the Calculate Lines button of the Control Charts window, this opens the Calculations for Charts dialogue box. 2) Enter the subgroups which you want to be included in the calculations in the "From" and "To" text boxes. Use individual shot numbers in the boxes - any shot in the subgroup will do. If the number contained in the message immediately below the "To" text box is the one you want to enter into the box, just click on the message with the mouse. If you click on the message below the "From" text box, the subgroup immediately after the shot number in the message is entered into the box. 3) To see how "Variation" calculates the position of the control lines, click the "Explain Calculations" button. 4) If you want control lines to be superimposed on the charts, make sure that the "Add Control Lines" check box is checked. 5) Click O.K. After calculations have been carried out, the subgroups which were included in the calculations are highlighted in red on the horizontal scale below each chart. If you want a clear indication of the distance of each point on the chart from the average, click the "Colours" check box in the chart window. The following colours will then be added to the points on the charts:- Black or Grey - Less than 1 sigma unit from the Mean line. Green - More than 1 sigma unit but less than 2 sigma units from the Mean line. Blue - More than 2 sigma units but less than 3 sigma units from the Mean line. Red - More than 3 sigma units from the Mean line. The colours can be helpful if you want to try applying the "Run Tests" when looking for special causes of variation. As long as the "Indicate Notes" box is checked, any subgroup which contains a note is shown by a vertical dotted line. The first letter of the note is shown above the line and if the note contains an exclamation mark, the letter will be shown in blue. To see the whole note, click on the vertical line with the mouse and hold down the mouse button. TABLE OF RESULTS FOR CHARTS --------------------------- A table of results for the charts can be seen by clicking on the "Table" button. The table shows the shot number for the first shot in each subgroup, the landing position for each shot, and the X-bar and Range (or the Moving Range) calculations. If any shot in the subgroup contains a note, this is indicated in the "Group Starts" column. All or part of the table can be placed on the Windows clipboard. This allows the results to be "pasted" into a Word Processor or Spreadsheet for further calculations or printout. To copy all or a part of the table on to the clipboard proceed as follows: 1) Highlight the section you want to be copied by dragging the mouse pointer from one corner of the section to the opposite corner. If you want the whole table to be copied, make sure that only ONE cell is highlighted. 2) Click the "Copy" button or press ALT + o on the keyboard. ======================================= The Histogram Window ======================================= Individual results are grouped into 20 bands. The height of each band is determined by the number of results which fall into the band. The histogram can be re-drawn with only some of the results included. This is done by clicking on the "Redraw Section" button. If all of the available shots are not included in the histogram, the "Redraw All" button becomes available. Clicking on this button redraws the histogram with all of results included. Note: The Histogram window can be changed in size or maximised. ======================================= The Funnel Experiment Simulation ======================================= This is a simulation of Dr W. Edwards Deming's funnel experiment. To start this feature, pull down the "File" menu and select "New". This mode uses different scales from other modes. Zero is the target value and centre-zero scales are used. This mode is self- documenting and I hope it requires no extra explanation. Note that it is not possible to save the results of this mode on file. Steve Horn, 21 Benjamin Drive, Bo'ness, West Lothian EH51 0QS, United Kingdom CompuServe 100116,3151 Internet steve@horn.demon.co.uk 8 January 1995